<!DOCTYPE html>
<!-- saved from url=(0071)http://www.uphsh.com/wap/ef73d9dc381d412f964b99e521c270a6/invoice/addUI -->
<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<!--<base href="http://www.uphsh.com:80/">--><base href=".">
<title>极速开票-银联荟生活</title>


<meta name="description" content="银联荟生活">
<meta name="keywords" content="银联荟生活">
<meta name="viewport" content="width=device-width,initial-scale=1.0,user-scalable=no">

	<link type="text/css" href="../../resource/tjxxfiles/wapcommon.css" rel="stylesheet">
	<link rel="stylesheet" href="../../resource/weuimin.css"/>
	<script src="../../resource/jquery1.js"></script>
	<script type="text/javascript" src="../../resource/common.js"></script>
	<script src="../../resource/tjxxfiles/jquery180min.js" type="text/javascript"></script>
	<script type="text/javascript" src="../../resource/tjxxfiles/wapcommon.js"></script>
    <script src="../../script/api.js"></script>
    <script type="text/javascript" src="../../script/aes.js"></script>
	<script type="text/javascript" charset="UTF-8" src="../../script/naes.js"></script>
	<script type="text/javascript" src="../../script/modeecb.js"></script>
    <script type="text/javascript" src="../../script/tmd5.js"></script>
    <script type="text/javascript" src="../../script/constants.js"></script>
</head>
<body>
   <header id="statusBar">
	<div class="header" style="background: #27a8fa;">
        <div class="return">
			<a tapmode="" style="color:#fff" onclick="api.closeWin();">
							<span>返回</span>
					</a>
        </div>
        <div class="tittle">
    		极速开票
        </div>
    </div>
    </header>
    <div id="contant" style="height: 563px;">
	    <div id="loadingToast" style="display:none;">
        <div class="weui-mask_transparent"></div>
        <div class="weui-toast">
            <i class="weui-loading weui-icon_toast"></i>
            <p class="weui-toast__content">请稍后...</p>
        </div>
	   </div>
	    	<div class="formContent">
	    		<dl>
	    			<dt>您的名称&nbsp;:</dt>
	    			<dd><input type="text" name="mc" id="userName" placeholder="请输入您要开票的单位名称或个人" value=""></dd>
	    		</dl>
	    		<dl>
	    			<dt>您的税号&nbsp;:</dt>
	    			<dd><input type="text" name="taxcode" id="taxCode" data-style="english" data-format="uppercase" placeholder="请输入发票税号" value=""></dd>
	    		</dl>
	    		<div style="margin-left:6%;margin-right:6%;color:red;">*根据《国家税务总局公告2017年第16号》文件规定，自2017年7月1日起，购买方未提供税号的增值税普通发票不得作为有效凭证</div>
	    		<dl>
	    			<dt>单位地址&nbsp;:</dt>
	    			<dd><input type="text" name="yydz" id="address" placeholder="请输入单位地址（增值税专用发票必填）" value=""></dd>
	    		</dl>
	    		<dl>
	    			<dt>联系电话&nbsp;:</dt>
	    			<dd><input type="tel" name="dhhm" id="phoneNumber" placeholder="请输入单位联系电话（增值税专用发票必填）" value="" data-maxlength="15"></dd>
	    		</dl>
	    		<dl>
	    			<dt>开户银行&nbsp;:</dt>
	    			<dd><input type="text" name="yh" id="bankName" placeholder="请输入开户银行（增值税专用发票必填）" value=""></dd>
	    		</dl>
	    		<dl>
	    			<dt>银行帐号&nbsp;:</dt>
	    			<dd><input type="tel" name="zh" id="bankNumber" placeholder="请输入银行帐号（增值税专用发票必填）" value="" data-maxlength="28" data-style="cardno"></dd>
	    		</dl>
	    	</div>
	    	<div id="errorInfo"   style="height:20px;text-align: center;color: red;">
	</div>
	    <div style="padding: 0 10px;">
			<input type="button" id="btn_sub" onclick="saveUInfo();" class="button" value="保存">
		</div>
		<div class="js_dialog" id="iosDialog2" style="display: none;">
            <div class="weui-mask"></div>
            <div class="weui-dialog">
                <div class="weui-dialog__bd">保存失败，请重试！</div>
                <div class="weui-dialog__ft">
                    <a href="javascript:;" onclick="$('#iosDialog2').fadeOut(200);" class="weui-dialog__btn weui-dialog__btn_primary">确定</a>
                </div>
            </div>
        </div>
        <div id="toast" style="display: none;">
        <div class="weui-mask_transparent"></div>
        <div class="weui-toast">
            <i class="weui-icon-success-no-circle weui-icon_toast"></i>
            <p class="weui-toast__content">保存成功！</p>
        </div>
    </div>

 
 
<img src="../../resource/tjxxfiles/wapstat.php" width="0" height="0" alt="">
<script type="text/javascript" src="../../resource/tjxxfiles/jweixin100.js"></script>
<script type="text/javascript" src="../../resource/tjxxfiles/jweixin100.js(1)"></script>
<script type="text/javascript" src="../../script/constants.js"></script>
<script type="text/javascript">

</script>
	</div>


<script type="text/javascript">
var openid = '';
apiready=function(){ 
   if(api.systemType == "ios"){
      document.getElementById("statusBar").style.background = "#298cb4";
   }
   $api.fixStatusBar( $api.dom('header') );
   openid = $api.getStorage('openid');
}

function saveUInfo(){
	$("#loadingToast").fadeIn(100);
	$("#errorInfo").html("");
	if(!unionTools.isNullValue($("#userName").val())){
		$("#errorInfo").html("请输入您要开票的单位名称或个人");
		$("#loadingToast").fadeOut(100);
		return;
	}

    var callback = function(ret, err){
        //console.log(JSON.stringify(ret));
        if (ret) {
		if(ret.success==true){
        		var $toast = $('#toast');
        		if ($toast.css('display') != 'none') return;
                $toast.fadeIn(100);
                setTimeout(function () {
                    $toast.fadeOut(100);
//                     window.location.href='<%=contextPath%>/wx/index.jsp';
					clearInput();
					api.sendEvent({
    					name: 'reload',
   					 extra: {
       					 key1: '1'
    					}
					});
					api.closeWin();
                }, 500);
        	}else{
        		api.alert({msg:ret.rst});
        		$('#iosDialog2').fadeIn(200);
        	}
   	    } else {
    	    $('#iosDialog2').fadeIn(200);
    	    api.alert({msg:'网络异常'});
    	}   
    }
    var content = {"openId":openid,userName:$("#userName").val(),taxCode:$("#taxCode").val(),address:$("#address").val(),phoneNumber:$("#phoneNumber").val(),bankName:$("#bankName").val(),bankNumber:$("#bankNumber").val()};
    apiAjax(JSON.stringify(content),url.bcyhxx,callback);
	setTimeout(function () {
		$("#loadingToast").fadeOut(100);
    },2000);
}

function submit(){
	var mc = $("#mc").val();
	if (mc === '') {
		$.message("请输入您要开票的单位名称或个人");
		return;
	}
	$(".button").hide()
	document.forms[0].submit();
}

function clearInput(){
	$("#userName").val("");
	$("#taxCode").val("");
	$("#address").val("");
	$("#phoneNumber").val("");
	$("#bankName").val("");
	$("#bankNumber").val("");
}
</script>

</body></html>